class Marathon {
    public static void main (String[] arguments) {
        String[] names = {
            "Elena", "Thomas", "Hamilton", "Suzie", "Phil", "Matt", "Alex",
            "Emma", "John", "James", "Jane", "Emily", "Daniel", "Neda",
            "Aaron", "Kate"
        };

        int[] times = {
            341, 273, 278, 329, 445, 402, 388, 275, 243, 334, 412, 393, 299,
            343, 317, 265
        };

        for (int i = 0; i < names.length; i++) {
            System.out.println(names[i] + ": " + times[i]);
        }
        int index = find_best(times);
        int seonde_index = find_seconde_best(times);
        System.out.println("Fastest is " + names[index] + ": " + times[index]);
        System.out.println("Second fastest is " + names[seonde_index] + ": " + times[seonde_index]);
    }
    public static int find_best(int[] times){
        int lowest = Integer.MAX_VALUE;
        int index = -1;
        for(int i = 0; i < times.length; ++i){
            if(times[i] < lowest){
                lowest = times[i];
                index = i;
            }
        }
        return index;
    }
    public static int find_seconde_best(int[] times){
        int second_lowest = Integer.MAX_VALUE;
        int second_index = -1;
        int index = find_best(times);
        int lowest = times[index];
        for(int i = 0; i < times.length; ++i){
            if(times[i] < second_lowest && times[i] != lowest){
                second_index = i;
                second_lowest = lowest;
            }
        }
        return second_index;
    }
} 